package com.ktgj.flight.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.FlightOrderAttachmentMapper;
import com.ktgj.flight.domain.FlightOrderAttachment;
import com.ktgj.flight.service.IFlightOrderAttachmentService;

/**
 * 订单附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-26
 */
@Service
public class FlightOrderAttachmentServiceImpl implements IFlightOrderAttachmentService 
{
    @Autowired
    private FlightOrderAttachmentMapper flightOrderAttachmentMapper;

    /**
     * 查询订单附件
     * 
     * @param attachmentId 订单附件ID
     * @return 订单附件
     */
    @Override
    public FlightOrderAttachment selectFlightOrderAttachmentById(Long attachmentId)
    {
        return flightOrderAttachmentMapper.selectFlightOrderAttachmentById(attachmentId);
    }

    /**
     * 查询订单附件列表
     * 
     * @param flightOrderAttachment 订单附件
     * @return 订单附件
     */
    @Override
    public List<FlightOrderAttachment> selectFlightOrderAttachmentList(FlightOrderAttachment flightOrderAttachment)
    {
        return flightOrderAttachmentMapper.selectFlightOrderAttachmentList(flightOrderAttachment);
    }

    /**
     * 新增订单附件
     * 
     * @param flightOrderAttachment 订单附件
     * @return 结果
     */
    @Override
    public int insertFlightOrderAttachment(FlightOrderAttachment flightOrderAttachment)
    {
        flightOrderAttachment.setCreateTime(DateUtils.getNowDate());
        return flightOrderAttachmentMapper.insertFlightOrderAttachment(flightOrderAttachment);
    }

    /**
     * 修改订单附件
     * 
     * @param flightOrderAttachment 订单附件
     * @return 结果
     */
    @Override
    public int updateFlightOrderAttachment(FlightOrderAttachment flightOrderAttachment)
    {
        return flightOrderAttachmentMapper.updateFlightOrderAttachment(flightOrderAttachment);
    }

    /**
     * 批量删除订单附件
     * 
     * @param attachmentIds 需要删除的订单附件ID
     * @return 结果
     */
    @Override
    public int deleteFlightOrderAttachmentByIds(Long[] attachmentIds)
    {
        return flightOrderAttachmentMapper.deleteFlightOrderAttachmentByIds(attachmentIds);
    }

    /**
     * 删除订单附件信息
     * 
     * @param attachmentId 订单附件ID
     * @return 结果
     */
    @Override
    public int deleteFlightOrderAttachmentById(Long attachmentId)
    {
        return flightOrderAttachmentMapper.deleteFlightOrderAttachmentById(attachmentId);
    }
}
